<?php
class Omini_model extends CI_Model{
    private $_table = "tbl_order_mini";
    public function __construct(){
        parent::__construct();
        $this->load->database();
    }
    public function count_all(){
        return $this->db->count_all($this->_table);
    }
    public function listorder($off,$start){
        $this->db->limit($off,$start);
        $query = $this->db->get($this->_table);
        return $query->result_array();
    }
    public function order_view($id){
        $this->db->where("om_id",$id);
        return $this->db->get($this->_table)->row_array();
    }
    public function del($id){
        $this->db->where("om_id",$id);
        $this->db->delete($this->_table);
    }
    public function update_status($data,$id){
        $this->db->where("om_id",$id);
        $this->db->update($this->_table,$data);
    }
}